import { http } from "@/utils/http";

export const GetHomeProducts = (
	data: Eps.MallService.GetHomeProducts_Params = {}
): Promise<Eps.MallService.GetHomeProducts> => {
	return http.post(`/MallService/GetHomeProducts`, Object.values(data));
};

export const GetProduct = (
	data: Eps.MallService.GetProduct_Params = {}
): Promise<Eps.MallService.GetProduct> => {
	return http.post(`/MallService/GetProduct`, Object.values(data));
};

export const GetProducts = (
	data: Eps.MallService.GetProducts_Params = {}
): Promise<Eps.MallService.GetProducts> => {
	return http.post(`/MallService/GetProducts`, Object.values(data));
};

export const GetProductSkus = (
	data: Eps.MallService.GetProductSkus_Params = {}
): Promise<Eps.MallService.GetProductSkus> => {
	return http.post(`/MallService/GetProductSkus`, Object.values(data));
};

export const GetProductsV2 = (
	data: Eps.MallService.GetProductsV2_Params = {}
): Promise<Eps.MallService.GetProductsV2> => {
	return http.post(`/MallService/GetProductsV2`, Object.values(data));
};

export const GetAllCategories = (
	data: Eps.MallService.GetAllCategories_Params = {}
): Promise<Eps.MallService.GetAllCategories> => {
	return http.post(`/MallService/GetAllCategories`, Object.values(data));
};

export const GetCategories = (
	data: Eps.MallService.GetCategories_Params = {}
): Promise<Eps.MallService.GetCategories> => {
	return http.post(`/MallService/GetCategories`, Object.values(data));
};

export const GetHomeCategories = (
	data: Eps.MallService.GetHomeCategories_Params = {}
): Promise<Eps.MallService.GetHomeCategories> => {
	return http.post(`/MallService/GetHomeCategories`, Object.values(data));
};

export const GetBrands = (
	data: Eps.MallService.GetBrands_Params = {}
): Promise<Eps.MallService.GetBrands> => {
	return http.post(`/MallService/GetBrands`, Object.values(data));
};

export const CancelOrder = (
	data: Eps.MallService.CancelOrder_Params = {}
): Promise<Eps.MallService.CancelOrder> => {
	return http.post(`/MallService/CancelOrder`, Object.values(data));
};

export const CreateOrder = (
	data: Eps.MallService.CreateOrder_Params = {}
): Promise<Eps.MallService.CreateOrder> => {
	return http.post(`/MallService/CreateOrder`, Object.values(data));
};

export const DeleteOrder = (
	data: Eps.MallService.DeleteOrder_Params = {}
): Promise<Eps.MallService.DeleteOrder> => {
	return http.post(`/MallService/DeleteOrder`, Object.values(data));
};

export const GetAllOrders = (
	data: Eps.MallService.GetAllOrders_Params = {}
): Promise<Eps.MallService.GetAllOrders> => {
	return http.post(`/MallService/GetAllOrders`, Object.values(data));
};

export const GetOrderDeliveryContent = (
	data: Eps.MallService.GetOrderDeliveryContent_Params = {}
): Promise<Eps.MallService.GetOrderDeliveryContent> => {
	return http.post(`/MallService/GetOrderDeliveryContent`, Object.values(data));
};

export const GetOrders = (
	data: Eps.MallService.GetOrders_Params = {}
): Promise<Eps.MallService.GetOrders> => {
	return http.post(`/MallService/GetOrders`, Object.values(data));
};

export const PayOrder = (
	data: Eps.MallService.PayOrder_Params = {}
): Promise<Eps.MallService.PayOrder> => {
	return http.post(`/MallService/PayOrder`, Object.values(data));
};
